﻿@using CV.Resources
@model IEnumerable<CV.Model.Attachment>

@{
    ViewBag.Title = Resources.Attachments;
}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2 class="page-header">@Resources.Attachments</h2>

    <p>
        @Html.ActionLink(Resources.Create, "Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Person.FullName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.AttachmentType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.AttachmentDate)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FileType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FilePath)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Summary)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Person.FullName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Title)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.AttachmentType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.AttachmentDate)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FileType)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FilePath)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Summary)
                </td>
                <td>
                    @Html.ActionLink(Resources.Edit, "Edit", new { id = item.ID }) |
                    @Html.ActionLink(Resources.Details, "Details", new { id = item.ID }) |
                    @Html.ActionLink(Resources.Delete, "Delete", new { id = item.ID })
                </td>
            </tr>
        }

    </table>
</div>